<?php

class Questao extends CI_Model{

	var $id = '';
	var $enunciado = '';
    var $etapa_id = '';
    var $disciplina_id = '';

	function __construct()
    {
        parent::__construct();
    }


    function salvar(){
    	$this->id = $this->input->post('id');
    	$this->descricao = $this->input->post('descricao');
        $this->etapa_id = $this->input->post('etapa_id');
    	
    	if($id == ''){
    		$this->db->insert('questoes', this);
    	} else{
    		$this->db->update('questoes', this, array('id' => $this->id));
    	}
    }

}


?>